import request from '@/utils/request'


// 查询任务申请列表
export function getHallList(param) {
	return request.get('task/hall/list', param)
}


// 获取大厅任务详细信息
export function applyById(id) {
	return request.get('task/hall/' + id)
}

// 获取任务类型
export function timed_task_type() {
	return request.get('system/dict/data/type/timed_task_type')
}


export const setApply = (data) => {
  return request.post('task/apply', data)
}

// 查询任务申请列表
export function applyList(param) {
	return request.get('task/apply/list', param)
}

//  资料
export function resourceList(param) {
	return request.get('study/resource/list', param)
}

//  资料详情
export function resourceById(id) {
	return request.get('study/resource/' + id)
}

//  获取视频时长
export function set_video_time() {
	return request.get('system/dict/data/type/set_video_time')
}

// 新增资料学习记录
export const studyLog = (data) => {
  return request.post('study/studyLog', data, {load: false})
}

// 申请详情
export function taskapplyById(id) {
	return request.get('task/apply/' + id)
}

// 修改申请任务
export const upApplyTask = (data) => {
  return request.put('task/apply', data)
}

// 增加已阅读数量
export function resourceRead(id) {
	return request.get('study/resource/read/' + id)
}
